package com.mingdong.first.factory.simpleFactory;

import com.mingdong.first.factory.pizza.ChinesePizza;
import com.mingdong.first.factory.pizza.EnglishPizza;
import com.mingdong.first.factory.pizza.Pizza;
import com.mingdong.first.factory.pizza.USAPizza;

public class SimplePizzaFactory {

	Pizza pizza;
	
	public Pizza createPizza(String orderType){
		
		if("chinese".equals(orderType)){
			pizza = new ChinesePizza();
		}else if("english".equals(orderType)){
			pizza = new EnglishPizza();
		}else if("usa".equals(orderType)){
			pizza = new USAPizza();
		}
		return pizza;
	}
	
}
